package com.example.leetcode.niuke;

import java.util.Scanner;

public class NiuKe15 {


    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.nextLine();
        int length = s.length();
        // 0 5 6 11
        // 1 4 7
        // 2 3 8 9 14 15
        int i = 0;
        int t = 0;
        while (i < length) {
            System.out.print(s.charAt(i));
            if (t  % 2 == 0) {
                i += 5;
            }else {
                i += 1;
            }
            t++;
        }
        System.out.println();
        t =0;
        i = 1 + 3 * t;
        while ( i < length) {
            System.out.print(s.charAt(i));
            t++;
            i = 1 + 3 * t;
        }
        i = 2;
        t = 0;
        System.out.println();
        while ( i < length) {
            System.out.print(s.charAt(i));
            if ( t % 2 == 0) {
                i += 1;
            }else {
                i += 5;
            }
            t++;
        }
    }
}
